package leetcode.leetcode100;

public class singleNumber {
    public static void main(String[] args) {
        int[] nums = {2,2,1};
        System.out.println(process(nums));
    }
    public static int process(int[] nums){
        int ans = 0;
        for (int i = 0; i < nums.length; i++) {
            ans = nums[i] ^ ans;
        }
        return ans;
    }
}
